import request from '@/utils/request'


export function fetchList(params) {
    return request({
        url: 'data/storage/list',
        method: 'get',
        params
    })
}

export function fetchDetail(params) {
    return request({
        url: 'data/storage/list/' + params.id,
        method: 'get',
        params
    })
}

export function fetchEchartDetail(params) {
    return request({
        url: 'data/storage/chartList/' + params.id,
        method: 'get',
        params
    })
}

export function fetchUploadStep1(params) {
    return request({
        url: 'receive/upload/step1',
        method: 'post',
        params
    })
}

export function fetchUploadStep2(data) {
    return request({
        url: 'receive/upload/step2',
        method: 'post',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        data: {
            type: 2,
            data: data
        }
    })
}

export function fetchUploadExl(data) {
    return request({
        url: `receive/generate/excel/${data.uuid}`,
        method: 'post',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        data: {
            type: 2,
            data: data
        }
    })
}